package com.ms.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

import java.util.Date;

@Data // Lombok：生成getter/setter、toString等
@NoArgsConstructor // 无参构造
@AllArgsConstructor // 全参构造
@TableName("place") // 指定数据库表名
public class Place {
    @TableId(value = "pl_id", type = IdType.AUTO) // 主键自增
    private Integer plId;
    
    @TableField("pl_name")
    private String plName;
    
    @TableField("pl_picture")
    private String plPicture;
    
    @TableField("pl_address")
    private String plAddress;
    
    @TableField(value = "pl_createTime")
    private Date plCreateTime; // 数据库默认CURRENT_TIMESTAMP，会自动填充
    
    @TableField("pl_maxPeople")
    private Integer plMaxPeople;
    
    @TableField("is_using")
    private Integer isUsing; // tinyint(1) 对应Java Integer
    
    @TableField("pl_Info")
    private String plInfo; // text 类型对应Java String
}